import request from '@/utils/request.js'

export const blogTypeApi = {
	list(typeQuery) {
		return request.get('/blogType/list', {params: typeQuery})
	},
	deleteById(id) {
		return request.delete( `/blogType/deleteById/${id}`)   //反引号，直接写参数。否则需要字符串拼接
	},
	deleteAll(ids) {
		return request.delete( `/blogType/deleteAll/${ids}`)
	},
	add(blogType) {
		//blogType以JSON形式传递到后台
		return request.post('/blogType/add', blogType)
	},
	selectById(id) {
		return request.get(`/blogType/selectById/${id}`)
	},
	update(blogType) {
		return request.put('/blogType/update', blogType)
	},
	selectAll(){
		return request.get('/blogType/selectAll')
	}
}
